package model

import "time"

type Chat struct {
	Id       uint64    `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	UserId   int64     `gorm:"column:user_id;type:bigint(20);not null;" json:"user_id"`
	FriendId int64     `gorm:"column:friend_id;type:bigint(20);not null;" json:"friend_id"`
	Content  string    `gorm:"column:content;type:varchar(255);not null;" json:"content"`
	CreateAt time.Time `gorm:"column:create_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"create_at"`
}

func (c *Chat) TableName() string {
	return "chat"
}
